﻿<%@ Assembly Name="Microsoft.SharePoint.ApplicationPages, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%> 
<%@ Page Language="C#" Inherits="Microsoft.SharePoint.ApplicationPages.ManageContentTypesPage" MasterPageFile="~/_layouts/application.master"      %> 
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %> 
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Register Tagprefix="wssawc" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="wssuc" TagName="ToolBar" src="~/_controltemplates/ToolBar.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="ToolBarButton" src="~/_controltemplates/ToolBarButton.ascx" %>
<%@ Register Tagprefix="wssap" Namespace="Microsoft.SharePoint.ApplicationPages" Assembly="Microsoft.SharePoint.ApplicationPages, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="PlaceHolderMain">
    <TABLE width="100%" cellpadding=0 cellspacing=0 border=0 id=onetidMngCytpeRptrTable>
    <colgroup>
        <col width="33%"/>
        <col width="33%"/>
        <col width="33%"/>
    </colgroup>
    <TR>
	    <TH scope="col" ID=ContentTypeHeader class=ms-vh2-nofilter>&nbsp;&nbsp;&nbsp;<SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,mngctype_HeadingCtype%>" EncodeMethod='HtmlEncode'/></TH>
	    <TH scope="col" ID=ParentTypeHeader class=ms-vh2-nofilter ><SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,mngctype_HeadingParent%>" EncodeMethod='HtmlEncode'/></TH>
	    <TH scope="col" ID=SourceTypeHeader class=ms-vh2-nofilter ><SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,mngctype_HeadingSource%>" EncodeMethod='HtmlEncode'/></TH>
    </TR>
    <asp:Label ID="Label1" Text="No PDF forms exist." runat="server"></asp:Label>
    </TABLE>
</asp:Content>

<script runat="server">
	protected override void OnLoad(EventArgs e)
	{
		EnsureChildControls();
		SPWeb web = SPContext.Current.Site.RootWeb;
		
		ContentPlaceHolder cp = (ContentPlaceHolder)Master.FindControl("PlaceHolderMain");
		// cp.Controls.Clear();

        Label1.Text = "";

        Table table = new Table();

        foreach (SPContentType spContentType in web.ContentTypes)
		{
            if (spContentType.Id.ToString().IndexOf("0x01010073DAA9922B6747718691FB9A943DA9E3") == 0)
            {
                TableRow tableRow = new TableRow();
                TableCell tableCell = new TableCell();
                tableCell.Text = "<a href=\"/_layouts/ManageContentType.aspx?ctype=" + spContentType.Id.ToString() + "\">" + spContentType.Name + "</a>";
                tableCell.CssClass = "ms-vb2";
                tableRow.Cells.Add(tableCell);

                tableCell = new TableCell();
                tableCell.Text = spContentType.Parent.Name;
                tableCell.CssClass = "ms-vb2";
                tableRow.Cells.Add(tableCell);

                tableCell = new TableCell();
                tableCell.Text = spContentType.Description;
                tableCell.CssClass = "ms-vb2";
                tableRow.Cells.Add(tableCell);

                table.Rows.Add(tableRow);
            }
        }
        cp.Controls.Add(table);

	}
</script>

